package com.cc;

import com.cc.entity.EOrder;
import com.cc.mapper.EOrderMapper;
import com.cc.Service.IEOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EOrderServiceImpl implements IEOrderService {

    @Autowired
    private EOrderMapper eOrderMapper;
    @Override
    public List<EOrder> listByPage(int page,int pageSize){
        int from=(page-1)*pageSize;
        return eOrderMapper.listByPage(from,pageSize);
    }
    //删除
    @Override
    public int delete(int id){
        return eOrderMapper.delete(id);
    }
    @Override
    public EOrder selectByCondition(Integer eoId){
        return eOrderMapper.selectById(eoId);
    }
    //修改
    @Override
    public int updateById(EOrder eOrder){
        return eOrderMapper.updateByPrimaryKey(eOrder);
    }
    //计算总记录数
    @Override
    public int total(){
        return eOrderMapper.total();
    }
    public List<EOrder> select(EOrder eOrder){
        return eOrderMapper.select(eOrder);
    }

}
